package edu.tongji.structureplayer.structure
{
    public class Property extends BaseStructure
    {
        private var _materialProperty:MaterialProperty;
        private var _sectionConstant:SectionConstant;
        
        public function Property(name:String, materialProperty:MaterialProperty, sectionConstant:SectionConstant)
        {
            super(name);
            _materialProperty = materialProperty;
            _sectionConstant = sectionConstant;
        }
        
        public function overlap(materialProperty:MaterialProperty, sectionConstant:SectionConstant):Boolean
        {
            if (_materialProperty!=materialProperty || _sectionConstant!=sectionConstant)
                return false;
            return true;
        }

        public function get materialProperty():MaterialProperty
        {
            return _materialProperty;
        }

        public function set materialProperty(value:MaterialProperty):void
        {
            _materialProperty = value;
        }

        public function get sectionConstant():SectionConstant
        {
            return _sectionConstant;
        }

        public function set sectionConstant(value:SectionConstant):void
        {
            _sectionConstant = value;
        }
        
        public function debugPrint():void
        {
            trace("Property " + name + "(" 
                + (_materialProperty==null?null:_materialProperty.name) + ", " 
                + (_sectionConstant==null?null:_sectionConstant.name) + ")");
        }


    }
}